package com.spring.cloud.controller;

import com.alibaba.fastjson.JSON;
import com.spring.cloud.service.ComputeClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by qpx on 2018/4/15.
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    ComputeClient config;

    @RequestMapping(method = RequestMethod.GET)
    public String test() {
        return JSON.toJSONString(config.queryWeekByID(1));
    }
}
